{% extends "public/layout.html" %}

{% block breadcrumb %}
     <ol class="breadcrumb">
        <li>
            <a href="{% url 'index' %}">首页</a>
        </li>
         <li>
             <a>发布系统</a>
         </li>
        <li class="active">
            <strong>上线历史</strong>
        </li>
    </ol>
{% endblock %}


{% block body %}
<div  class="wrapper wrapper-content animated fadeInRight">
<div class="row">
       <div class="col-sm-12">
            <div class="ibox float-e-margins">
                <div class="ibox-title">
                    <h5> 上线历史记录 </h5>
                </div>

                 <div class="ibox-content">
                    <div class="">
                        <form id="search_form" method="get" action="{% url 'deploy_history' %}" class="pull-right mail-search">
                            <div class="input-group">
                                <input type="text" class="form-control input-sm" id="search_input" name="search_keywords" placeholder="项目名|版本描述|更新详情">
                                <div class="input-group-btn">
                                    <button id='search_btn' type="submit" class="btn btn-sm btn-primary">
                                        -搜索-
                                    </button>
                                </div>
                            </div>
                        </form>
                    </div>
     
                    <table class="table table-striped table-bordered table-hover">
                        <thead>
                            <tr>
                                <th class="text-center">项目名称</th>
                                <th class="text-center">项目版本</th>
                                <th class="text-center">项目描述</th>
                                <th class="text-center">发布人</th>
                                <th class="text-center">发布状态</th>
                                <th class="text-center">申请时间</th>
                                <th class="text-center">发布时间</th>
                            </tr>
                        </thead>
                        <tbody>
                        {% for deploy_history in page_obj.object_list %}
                            <tr class="gradeX">
                                <td class="text-center">{{ deploy_history.name }}</td>
                                <td class="text-center" data-toggle="tooltip" data-placement="bottom" title="{{ deploy_history.update_detail }}"> {{ deploy_history.project_version }} </td>
                                <td class="text-center"> {{ deploy_history.version_desc}} </td>
                                <td class="text-center"> {{ deploy_history.assigned_to.name}} </td>
                                 <td class="text-center"><span class="label {% if deploy_history.status == 2 %}label-success{% elif deploy_history.status == 3 %}label-warning{% endif %}">{{ deploy_history.get_status_display}}</span></td>

                                <td class="text-center">{{ deploy_history.apply_time }}</td>
                                <td class="text-center">{{ deploy_history.deploy_time}}</td>
                            </tr>
                        {% endfor %}
                        </tbody>
                    </table>
                  <div class="row">
                        <div class="col-sm-6">
                            <div class="dataTables_info" id="editable_info" role="status" aria-live="polite">
                                显示 [{{ p.count }}] 条数据中的 第 [{{ page_obj.start_index }}] 至 [{{ page_obj.end_index }}] 的数据
                            </div>
                        </div>
                        {% include 'public/paginator.html' %}
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>


{% endblock %}
